package com.friends.design.mode.observer;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 *
 * @Author Zhao Tianhao
 * @Description 事件监听器B
 * @Date 2024/10/9 17:28
 */
@Slf4j
@Component
public class XEventListenerB {

	@EventListener
	public void onEvent(XEvent event) {
		log.info("XEventListenerB: {}", event.getMessage());
	}

	@EventListener
	public void onEventB(XEventB event) {
		log.info("XEventListenerB--B事件: {}", event.getMessage());
	}
}
